package com.gzc.house.user.api.dao;

import com.gzc.house.user.api.common.RestResponse;
import com.gzc.house.user.api.config.GenericRest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.stereotype.Service;

@Service
public class UserDao {

	@Autowired
	GenericRest rest;

	public String getUser(){

		String url = "http://user/getUser";
		RestResponse<String> body = rest.get(url, new ParameterizedTypeReference<RestResponse<String>>() {
		}).getBody();

		return body.getResult();
	}
}
